import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {path: '/', redirect: '/vitedemo'},
  {path: '/vitedemo', name: 'vitedemo', title: 'vite+Vue3基本用法演示', component: () => import('views/vitedemo/ViteDemo.vue')},
  {path: '/scriptsetup', name: 'scriptsetup', title: 'script setup语法糖', component: () => import('views/scriptSetup/ScriptSetup.vue')},
  {path: '/listsearch', name: 'listsearch', title: '列表搜索演示', component: () => import('views/list/ListSearch.vue')},
  {path: '/formdata', name: 'formdata', title: '表单输入绑定', component: () => import('views/formData/FormModel.vue')},
  {path: '/compmodel', name: 'compmodel', title: '在组件上使用v-model', component: () => import('views/vmodel/ComponentModel.vue')},
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
